﻿using System;

namespace Shot.Session.Cookies
{
    /// <summary>
    /// Defines an interface for a CookieManager, which allows the Shot application to 
    /// get or set cookie values on the client's browser.
    /// </summary>
    public interface ICookieManager
    {
        /// <summary>
        /// Instance of shot application
        /// </summary>
        AppInstance Instance { get; set; }

        /// <summary>
        /// Set a cookie's value
        /// </summary>
        /// <param name="name"></param>
        /// <param name="value"></param>
        /// <param name="callback"></param>
        void Set(string name, object value, Action callback = null);

        /// <summary>
        /// Get a cookie's value
        /// </summary>
        /// <param name="name"></param>
        /// <param name="callback"></param>
        void Get(string name, Action<object> callback);
    }
}
